﻿/*****************************************************
 * File:            Delegates.cs
 * Description:     Delegate functions used by Graph namespace
 * By:              Ali Khalili (khalili DOT ir AT gmail DOT com)
 * Project:         Automata Learning
 * Namespece		AIDE.Graph
 * Requirements:    
 * Change log:
 *          -15 May 2013:  Initial development
 * License:
 *****************************************************/

using System;
using System.Collections.Generic;
using SMLib.Base;
//using EnGine.Core;


namespace MBT.GraphAlgorithms
{
    /// <summary>
    /// Indicate whether a state is branch or not (a branch is a state where you cannot control which is the next state)
    /// </summary>
    /// <param name="state">the state</param>
    /// <returns>true if branch, false if not</returns>
    public delegate bool BranchingState<STATETYPE>(STATETYPE state);


    ///// <summary>
    ///// Designate whether a transition in graph is optional or not
    ///// <remarks>It is used in Chineese postman problem where reset edges (edges that connect each node 
    ///// to the inial node) is optional</remarks>
    ///// </summary>
    ///// <param name="tr">the transition</param>
    ///// <returns>true if tr is optional, false if it is mandatory</returns>
    //public delegate bool IsOptional(ITransition tr);


    /// <summary>
    /// Assign a floating point value for weight (or probability) of a transition in a graph
    /// </summary>
    /// <param name="t">transition</param>
    /// <returns>weight of transition t</returns>
    public delegate float TransitionWeighter<TRANSITIONTYPE>(TRANSITIONTYPE t);


    /// <summary>
    /// Assign an integer cost value for a transition in a graph
    /// </summary>
    /// <param name="t">transition</param>
    /// <returns>(non-negative) cost of transition t</returns>
    public delegate int TransitionCostAssigner<TRANSITIONTYPE>(TRANSITIONTYPE t);
}
